package com.njlime.member.repository.sms;

import com.njlime.core.helper.PageBean;
import com.njlime.member.entiies.TMember;
import com.njlime.sys.entities.Unit;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;

import java.util.Date;
import java.util.List;
import java.util.Map;

/**
 * Created by Dean on 2017-7-27.
 */
public interface MemberDao extends JpaRepository<TMember, Integer>, JpaSpecificationExecutor<TMember> {

    PageBean list(PageBean pageBean, TMember member, String startDay, String endDay, String condition, String flag, String priceType, String orderType);

    PageBean getReportList(PageBean pb, String provinceId, String startDay, String endDay, String cityId);

    void addReportInfo(String startDate);

    int updateStatus(TMember info);

    void editMemberGroup(int id, int groupId, int unitId);

    int updateGag(TMember info);

    List<TMember> selectUserGroupList(int groupId, String ids, int unitId);

    List<TMember> getMemberBybirthList(Integer unitId, Date date);

    List<Map<String, Object>> memberReport(Unit unit, Date start, Date end);

    Map<String, Object> welcomeReport(Unit unit);

    void userReport();

    PageBean report(PageBean pageBean, Unit unit, Date startTime, Date endTime, Integer province_id, Integer city_id);

    Map<String, Object> sumReport(Unit unit, Date startTime, Date endTime, Integer province_id, Integer city_id);
}
